#include "File.h"

QString FileErrorString(const QFile::FileError& errorId)
{
    QString error;

	switch (errorId)
	{
		case QFile::OpenError :
		{
			error = QString("Couldn't create file.\n");
			break;
		}
		case QFile::WriteError :
		{
			error = QString("Couldn't write to file.\n");
			break;
		}
        case QFile::ReadError : 
        {
            error = QString("Couldn't read from file.\n");
            break;            
        }
		default :
		{
			error = "File error.\n";
		}
	}

    return error;
}